package planes;
import java.util.concurrent.TimeUnit;

import javax.swing.ImageIcon;
import javax.swing.JLabel;

import GAME.game;
import weaponrelated.weapon;
import weaponrelated.*;

public abstract class plane extends JLabel{
	protected int hp;
	protected int vel;
	protected weapon arma;
	protected boolean up;
	protected boolean down;
	protected boolean left;
	protected boolean right;
	protected game game;
	public int gethp(){
		return hp;
	}
	public void hit(int i){
		if(hp>0){
		hp=hp-i;
		if(hp<=0)
			this.kill();
		}
	}
	public boolean isalive(){
		return hp>0;
	}
	public int getspeed(){
		return vel;
	}
	public abstract void mover();
	public void kill(){
		hp=0;
		Thread aux=new animacionexp(this,game);
		aux.start();
		aux=null;
		arma=null;
		
		//aca se hace la animacion de kill
		
	}

}
